package com.naiterui.ehp.bs.doctor.prodocl;

import java.util.List;

import org.springframework.data.annotation.Id;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
 * <患者档案实体>
 *

 * @version 2015年7月20日 上午11:59:14 by Amber
 */
public class MPatientDocument {


    /**
     * <主键>
     */
    @Id
    @JsonInclude(Include.NON_NULL)
    private String id;
    /**
     * <患者id>
     */
    private Long patientId;
    /**
     * <婚姻状态，0：未婚；1：已婚>
     */
    private Short maritalStatus;
    /**
     * <身高>
     */
    private Integer height;
    /**
     * <体重>
     */
    private Integer weight;
    /**
     * <过敏药物>
     */
    private MSelectOrOthers medicAllergys;
    /**
     * <过往病史>
     */
    private MSelectOrOthers pastDiseases;
    /**
     * <家族病史。数组size=0标识无家族病>
     */
    private List<MFamilyDisease> familyDiseases;
    /**
     * <遗传病>
     */
    private MSelectOrOthers hereditaryDiseases;
    /**
     * <吸烟情况>
     */
    private MSmoke smoke;
    /**
     * <饮酒情况>
     */
    private MDrink drink;

    /**
     * <创建时间>
     */
    @JsonInclude(Include.NON_DEFAULT)
    private String createAt;
    /**
     * <创建人>
     */
    @JsonInclude(Include.NON_DEFAULT)
    private String createBy;
    /**
     * <修改时间>
     */
    @JsonInclude(Include.NON_DEFAULT)
    private String changeAt;
    /**
     * <修改人>
     */
    @JsonInclude(Include.NON_DEFAULT)
    private String changeBy;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public Short getMaritalStatus() {
        return maritalStatus == null ? 0 : maritalStatus;
    }

    public void setMaritalStatus(Short maritalStatus) {
        this.maritalStatus = maritalStatus;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public MSelectOrOthers getMedicAllergys() {
        return medicAllergys;
    }

    public void setMedicAllergys(MSelectOrOthers medicAllergys) {
        this.medicAllergys = medicAllergys;
    }

    public MSelectOrOthers getPastDiseases() {
        return pastDiseases;
    }

    public void setPastDiseases(MSelectOrOthers pastDiseases) {
        this.pastDiseases = pastDiseases;
    }

    public List<MFamilyDisease> getFamilyDiseases() {
        return familyDiseases;
    }

    public void setFamilyDiseases(List<MFamilyDisease> familyDiseases) {
        this.familyDiseases = familyDiseases;
    }

    public MSelectOrOthers getHereditaryDiseases() {
        return hereditaryDiseases;
    }

    public void setHereditaryDiseases(MSelectOrOthers hereditaryDiseases) {
        this.hereditaryDiseases = hereditaryDiseases;
    }

    public MSmoke getSmoke() {
        return smoke;
    }

    public void setSmoke(MSmoke smoke) {
        this.smoke = smoke;
    }

    public MDrink getDrink() {
        return drink;
    }

    public void setDrink(MDrink drink) {
        this.drink = drink;
    }

    /**
     * <更新被编辑的属性信息>
     * 
     * @param client 客户端编辑信息,为null的不处理，只处理非空属性
     * @return void <返回值描述>
     * @History 2015年7月21日 上午11:36:00 by Amber
     */
    public void update(MPatientDocument client) {
        if (client.getMaritalStatus() != null) {
            this.maritalStatus = client.getMaritalStatus();
        }
        if (client.getWeight() != null) {
            this.weight = client.getWeight();
        }
        if (client.getHeight() != null) {
            this.height = client.getHeight();
        }
        if (client.getMedicAllergys() != null) {
            this.medicAllergys = client.getMedicAllergys();
        }
        if (client.getPastDiseases() != null) {
            this.pastDiseases = client.getPastDiseases();
        }
        if (client.getFamilyDiseases() != null) {
            this.familyDiseases = client.getFamilyDiseases();
        }
        if (client.getHereditaryDiseases() != null) {
            this.hereditaryDiseases = client.getHereditaryDiseases();
        }
        if (client.getSmoke() != null) {
            this.smoke = client.getSmoke();
        }
        if (client.getDrink() != null) {
            this.drink = client.getDrink();
        }
    }

    public String getCreateAt() {
        return createAt;
    }

    public void setCreateAt(String createAt) {
        this.createAt = createAt;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getChangeAt() {
        return changeAt;
    }

    public void setChangeAt(String changeAt) {
        this.changeAt = changeAt;
    }

    public String getChangeBy() {
        return changeBy;
    }

    public void setChangeBy(String changeBy) {
        this.changeBy = changeBy;
    }

}